<ion-view title="MẶT HÀNG" ng-controller="Product">
    <ion-nav-buttons side="left">
        <button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
    </ion-nav-buttons>

    <ion-content>
        <div class="row">
            <label class="item item-input" style="width: 100%">
                <i class="icon ion-search placeholder-icon"></i>
                <input type="text" placeholder="Tên mặt hàng">
            </label>
        </div>
        <ion-list show-delete="data.showDelete" show-reorder="data.showReorder">
            <ion-item ng-repeat="item in items" item="item" href="#/item/{{item.id}}">
                {{ item.name_product }}
                <ion-delete-button class="ion-minus-circled" ng-click="onItemDelete(item)">
                </ion-delete-button>
            </ion-item>
        </ion-list>
    </ion-content>

    <ion-footer-bar align-title="left" class="bar-assertive">
        <div class="buttons col col-20 item-button-left" style="text-align: left">
            <button class="button button-icon icon ion-ios7-minus-outline button-positive"
                    ng-click="data.showDelete = !data.showDelete">
            </button>
        </div>
        <div class="buttons col col-20 item-button-right" style="text-align: right; margin-left: 60%">
            <button class="button button-icon icon ion-plus-round button-positive"
                    ng-click="AddProduct()"></button>
        </div>
    </ion-footer-bar>

    <script id="modal.html" type="text/ng-template">
        <div class="modal">
            <ion-header-bar class="bar bar-header bar-positive">
                <h1 class="title">New Stooge</h1>
                <button class="button button-clear button-primary" ng-click="modal.hide()">Cancel</button>
            </ion-header-bar>
            <ion-content>
                <div class="padding">
                    <div class="list">
                        <label class="item item-input">
                            <span class="input-label">Name</span>
                            <input ng-model="form.name" type="text" name="name" />
                        </label>
                        <button class="button button-full button-positive" ng-click="addStooge()">Create</button>
                    </div>
                </div>
            </ion-content>
        </div>
    </script>


</ion-view>

